<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@page import="java.util.Enumeration"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>登录页</title>
<link rel="Shortcut Icon" type="image/x-icon" href="/images/favicon.ico" />
<link href="${base}/css/login.css" rel="stylesheet" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<script src="${base}/scripts/jquery.js" type="text/javascript"></script>
<script>
	function checkLogin(){
		var name =  jQuery("input[name='j_username']").val();
		var psw =jQuery("input[name='j_password']").val();
		if(name ==""){
			alert("请输入用户名!");
			return false;
		}
		if(psw == ""){
			alert("请输入密码!");
			return false;
		}
		return true;
	}

</script>
</head>
<body>
			   <form id="loginForm" action="${base}/j_spring_security_check" method="post" onsubmit="return checkLogin()">
			   <input type="hidden" name="yellowpage" value="ture"/> 
			   <table align="center" cellspacing="10">
				<tr>
					<td height="80" colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td align="center" colspan="3">
						<img src="${base}/css/loginPic/logo.png" width="550px;" /><br/><br/>
					</td>
				</tr>
				<tr>
					<td><input maxlength="11" name="j_username" class="inputText" onclick="this.select()" value="帐号" type="text"/></td>
					<td><input maxlength="22" name='j_password' class="inputText" type="password"/></td>
					<td><input type="submit" value="" class="loginBtn"/></td>
				</tr>
				<tr>
					<td colspan="3" align="center" class="copyFont" >
						<!-- 这里是错误信息 -->
						<%
							if (request.getParameter("error") != null
							&& request.getParameter("error").equals("1")) {
						%>
							<span style="color: red"> <strong>用户名或密码错误,请重试!</strong> </span>
						<%
							} else if (request.getParameter("error") != null
								&& request.getParameter("error").equals("3")) {
						%>
							<span style="color: red">  <strong>系统发现您在别处登录!</strong> </span>
						<%
							} else if (request.getParameter("error") != null
							&& request.getParameter("error").equals("7")) {
						%>
							<span style="color: red">  <strong>使用超时，请重新登录!</strong> </span>
						<%
							}else if(request.getParameter("error") != null
									&& request.getParameter("error").equals("8")){
						%>
							<span style="color: red;font-size:12px;">  <strong>您好，你属于短信用户，不能登录网页平台。如果有疑问，请联系客服电话：0755-83100221 QQ：2858891717</strong> </span>	
						<%
							}
						%>
						
						
					</td>
				</tr>
				<tr>
					<td colspan="3" align="right" style="color:#FFFFFF;font-size:9px;">为达到最佳效果 请使用谷歌/火狐浏览器</td>
				</tr>
				</table>
				</form>
		<div class="BenBtba"></div>
		<div style="color:#FFFFFF; font-size:15px;bottom:20px;  position: absolute; width:100%; text-align:center;"><span>2011,FAHE, www.xindianwang.com  版权所有：法何科技</span> </div>
		<div style=" margin-top:0px; margin-left: 0px;position:absolute;top:0;left:0;z-index:-1; overflow:hidden; width:100%; height:100%">
		<SCRIPT language="JavaScript"><!--
today=new Date();
jran=today.getTime();
function rnd() {
    ia=9301;
    ic=49297;
    im=233280;
    jran = (jran*ia+ic) % im;
    return jran/(im*1.0);
};
function rand(number) {
    return Math.ceil(rnd()*number);
};
for(i=1;i<=1;i++) {
    myNum=(rand(10)); //改成你要随机显示的图片数；
if(myNum == 1) document.write("<img src='${base}/css/images/0.jpg' width='100%'height='100%' >"); 
if(myNum == 2) document.write("<img src='${base}/css/images/1.jpg' width='100%'height='100%' >"); 
if(myNum == 3) document.write("<img src='${base}/css/images/2.jpg' width='100%' height='100%'>"); 
if(myNum == 4) document.write("<img src='${base}/css/images/3.jpg' width='100%'height='100%'>"); 
if(myNum == 5) document.write("<img src='${base}/css/images/4.jpg' width='100%'height='100%'>"); 
if(myNum == 6) document.write("<img src='${base}/css/images/bj5.jpg' width='100%' height='100%'>"); 
if(myNum == 7) document.write("<img src='${base}/css/images/bj6.jpg' width='100%'height='100%'>"); 
if(myNum == 8) document.write("<img src='${base}/css/images/bj7.jpg' width='100%'height='100%' >"); 
if(myNum == 9) document.write("<img src='${base}/css/images/bj8.jpg' width='100%'height='100%'>"); 
if(myNum == 10) document.write("<img src='${base}/css/images/bj9.jpg' width='100%' height='100%'>"); 
    else {
document.write();
}
};

</SCRIPT>  
		       </div>
</body>
</html> 
